package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.zombiefanpassive.zombiefanpassive.ZombieFanPassiveQuery;
import com.uzai.console.entity.ZombieFanPassive;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface ZombieFanPassiveMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int insert(ZombieFanPassive record);

    int insertSelective(ZombieFanPassive record);

    ZombieFanPassive selectById(@Param("id") Long id, @Param("merId") Long merId);

    ZombieFanPassive selectByWxid(@Param("wxid") String wxid, @Param("merId") Long merId);

    int updateByIdSelective(ZombieFanPassive record);

    int updateById(ZombieFanPassive record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<ZombieFanPassive> findByList(Page<ZombieFanPassive> page, @Param("query") ZombieFanPassiveQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    ArrayList<ZombieFanPassive> findByList(@Param("query") ZombieFanPassiveQuery query);

    /**
     * 查询最新添加的未请求被动僵尸粉
     * @param merId
     * @return
     */
    ZombieFanPassive selectNewestAndStatus(@Param("merId") Long merId, @Param("status") Integer status);
}